# Filters added to this controller will be run for all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
  
  def authorized
    unless session[:user]
      redirect_to :action => :unauthorized
    end
  end
  
  def set_history
    session[:history] = request.request_uri
  end
  
  def unauthorized
    render :text => "Forbidden", :status => 403, :layout => false
  end
  
end